﻿using System;
using System.Collections.Generic;
using System.Data.Objects;
using System.Linq;
using System.Text;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;

namespace DataModel.DBService
{
    public partial class ProductDBContext : DbContext
    {
        public ProductDBContext()
            : base("name=productEntities")
        {
            //禁用延迟加载
            this.Configuration.LazyLoadingEnabled = false;
            //禁用代理
            this.Configuration.ProxyCreationEnabled = false;
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            throw new UnintentionalCodeFirstException();
        }
    }

}
